package com.java.teacherexer.exer2;

/**
 * @author shkstart
 * @create 2021-02-01 8:58
 */
public class Add extends Thread {


    static int sum;
    private int number;


    public Add(int n) {
        number = n;
    }


    @Override
    public void run() {


        int count = 0;
        for (int i = 0; i < 10; i++) {
            count = count + number + i;
        }
        System.out.println(number + "+" + (number + 1) + "+" + (number + 2) + "+" + (number + 3) + "+" + (number + 4)
                + "+" + (number + 5) + "+" + (number + 6) + "+" + (number + 7) + "+" + (number + 8) + "+" + (number + 9)
                + "=" + count);
        sum = sum + count;
    }


}
